Introduction
From this point on, you need a design to work with.  Perhaps you have already created some type of design using the methods described in the "Design View Manipulation" and "Object Manipulation" chapters. If you don't want to create your own design just yet, you can always use the "Simple design" which I have created for you and placed in the "Documentation" folder. Rendering an image is very simple, since you only need to select the menu item "Render -> Render Image". However, there are several settings which you will want to define beforehand to control how the image gets rendered. These settings include the size and color environment of the image, the viewing location, etc. The purpose of this chapter is to explain these settings and how you can change them in order to obtain a really nice looking rendered image.

Defining Eye View Size, Image Size,
And Color Environment
The "Eye View Window" is a window which displays just one view: the "eye view". Unlike the views in the design window, the eye view can be completely customized. By manipulating the eye view settings, you can see your design from any angle. The eye view defines the view of the next image to be rendered. That is, what you see as wire-frames in the eye view is what you will see shaded in the rendered image. The menu item "Render -> Image Settings..." will open the dialog box shown below. This dialog is controls the size and color environment of the images you will render, as well as the relative size of the eye view window. 

The "Horizontal" and "Vertical" edit text values let you specify the size (in pixels) of the next image to be rendered. If you are not sure what values to enter here, select one of the adjacent buttons which will set these values to some fraction of the size of your main screen. The size that you specify will also affect the size of the eye view window, but it will be scaled by the percentage which is entered in the "Relative Eye View Window Size" edit text box. This is useful when you want the eye view to be a different size than the image which will be rendered. For example, if the image size were set to be larger than the screen, you would probably want to decrease this percentage so that the eye view window still fits on the screen.

When an image is rendered, it is usually not rendered on the screen. Instead it is rendered into an "offscreen graphics environment". An offscreen graphics environment acts like a virtual monitor which you cannot see. Since it is not tied to any piece of display hardware, it can be larger (contain more pixels) than your monitor and often display more colors. In fact, its characteristics are only limited by how much memory (RAM) is available for RenderBoy. The radio buttons in the above dialog determine the "depth" of the offscreen graphics environment, that is, the number of memory bits which are used to store each pixel's color. The best choice is to store 32 bits per pixel (although only 24 of these are actually used), which allows the graphics environment to represent exactly 16,777,216 colors. The second best choice is to store 16 bits per pixel (although only 15 of these are actually used), which allows the graphics environment to represent exactly 32,768 colors. A 32 bit graphics environment can represent more colors than the human eye can discern, so the color representation of the image will seem perfect. This is not the case for a 16 bit graphics environment, in which some banding of colors will be visible. But for obvious reasons, a 32 bit graphics environment will use twice as much memory as a 16 bit one, so you may be forced to compromise if you are limited by memory. 

At this point, you might be asking, "What good is this offscreen graphics environment, since I can only see the colors my monitor can display?" Good question. The answer is that a technique called "dithering" is used by RenderBoy to make it appear as if your monitor can display many more colors than it actually can. With dithering, unavailable colors are simulated by using patterns created from available colors. Once the image has been rendered into the offscreen graphics environment, it will be dithered into a window on your monitor. If you have an 8 bit per pixel (256 color) display or better, the results will look very nice.

Defining The Eye View Target
The eye view target is the three dimensional location in your design that the eye view is "looking at". This is specified with the "Eye Target" tool which is available under the "Tools" menu described in the "Menu Functions" chapter. This tool is used by clicking (in the front, side, or top design views) the portion of the design that the eye view should look at. Each time you do this, the eye view will be immediately updated. If you are not sure where to set the target, it is usually OK to just set the eye view target somewhere near the center of your design.

Defining The Eye View Parameters
As stated previously, the eye view is completely customizable. In other words, after you have completed a design, the eye view can be used to view it from any location. The previous sections described how to specify the characteristics of the eye view window and how to specify what to look at. The next step is to use the menu item "Render -> Eye View Settings...", which will open the dialog box shown below.

The eye view is changed by manipulating four parameters: scale factor, rotation angle, height angle, and eye distance. In the above dialog box, there are two edit text values for each parameter. The left one contains the current value of the parameter. The right one contains an offset (or multiplier, for scale factor and eye distance) which can modify the parameter on the left. Each time you press the "Apply" button, the parameters will be offset (or multiplied) by the specified amount, then the values of the parameters will be used to update the eye view.  By using the current and offset values together, it is relatively easy to quickly experiment with several different eye view settings. They can also be used to simulate how the frames of an animation will change if you are rendering a movie.

Another method of easily changing the eye view settings is by using the arrow keys on the keyboard.  In order for the arrow keys to manipulate the eye view, the eye view must be the active window and the mouse must be within that window.  Otherwise, the arrow keys will affect other windows or dialog boxes.  The usage of the arrow keys is described in more detail below.

The "Scale Factor" edit text value controls the relative size of the scene which is displayed in the eye view. Making it smaller will decrease the size, and making it larger will increase the size. Adjust this value so that the eye view is displayed at the desired size.  You can also increase or decrease the scale factor using the up and down arrow keys.  For this to work, the "...scale factor and eye distance" radio button must be selected. Hold down the option key while using the arrows for a fine adjustment.

The "Rotation Angle" and "Height Angle" edit text values control the direction from which you view the target location. The rotation angle controls your side-to-side movement around the target location, with positive is to the right and negative is to the left. The height angle controls your movement above and below the target location, where positive is up and negative is down.  You can also increase or decrease the viewing angles using the up, down, left, and right arrow keys.  For this to work, the "...rotation and height angles" radio button must be selected.  Hold down the option key while using the arrows for a fine adjustment.

"Huy?  What do you mean?"  An example should clarify this.

Imagine that your object is a car on the ground and that you are standing directly in front of it. The target location is in the center of the car at eye level, and you are looking directly at it. From this location, which RenderBoy calls the "front view", both the rotation angle and height angle are zero. As you move around the car to the right, the rotation angle of your view is increasing. It is 90 degrees when facing the driver's side (left) door, 180 degrees when facing the rear of the car, 270 degrees (or -90 degrees) when facing the passenger's side (right) door, etc.  Next imagine that you have a ladder which you can climb to look down at the car from various heights. The height angle is the angle between your elevated line of sight and a horizontal plane which passes through the eye target location. As you climb the ladder, the height angle increases. If you were directly over the car, it would be 90 degrees. Likewise, if you were to lay down on the ground, it would be negative. As you can see,  by adjusting the rotation and height angles, you can view the target location of your design from any direction. Note that this "two-angle" method of specifying a direction is used in other areas of RenderBoy as well, so you should get used to it. Specifically, it is also used to indicate the orientation of directed light and optionally for the projection angle of textures onto objects.

The "Eye Distance" edit text value determines how far from the target location your eye is, and this is in the same units as all of the object dimensions. You will usually adjust this value last.  You can also increase or decrease the eye distance using the right and left arrow keys.  For this to work, the "...scale factor and eye distance" radio button must be selected. Hold down the option key while using the arrows for a fine adjustment. 

While you adjust the eye distance, the eye view is maintained so that objects at the target location will not change size on the screen. As a result, modifying the eye distance is actually a way of changing the amount of "perspective". Perspective is what makes close objects appear larger than objects far away. If the eye distance is large relative to the size of your design, there will be very little perspective. As you make the eye distance smaller, the effects of perspective will be more noticeable. Adjust this parameter to achieve the desired effect. Note that it is possible to adjust the eye distance so that your viewing location is actually inside an object. You should avoid this. In this situation, the mathematical algorithms within RenderBoy are no longer valid. The results you get won't make sense.

Image Preparation Exercises
Either create your own simple design or open the design file called "Simple design" mentioned earlier.  If you use the "Simple design", don't save any changes you make to it, since will want to re-use it "as is" in the next chapter.

Use the "Render -> Image Settings..." menu item to edit the image settings. You will probably want to set the image size to something around 300x200 pixels. Smaller images will take less time to render. Notice that the image size which you specify also determines the size of the eye view window.

Hopefully, your design is now visible in the eye view window. If not, it may be necessary to use the "Eye Target" tool to make the eye view "look at" the center of your design. In any case, you should experiment with the eye target tool in order to understand how it adjusts what the eye view is looking at. While doing this, you may also want to use the menu item "Render -> Eye View Settings...", which will open the eye view settings dialog box. Manipulate the parameters in this dialog in order to practice scaling the eye view and looking at your design from different angles. Finally, experiment with the eye distance in order to achieve the desired amount of perspective.  You will probably find that the arrow keys are the best way to experiment with different eye view settings.

If you come up with an eye view which you would like to see rendered, be sure to save the design. The rendering of such views will be described in the next two chapters.